// TOWN SCRIPT
//    Town 2: Timoria

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documenation. States you write
// yourself should be numbered from 10-100.

begintownscript;

variables;

int i,j,k;

body;

beginstate INIT_STATE;
	set_crime_tolerance(1);
	
	set_name(6,"Lucretia");
	set_char_dialogue_pic(6,1947,0);
	set_name(7,"Collatinus");
	set_char_dialogue_pic(7,1949,0);
	set_name(8,"Brutus");
break;

beginstate EXIT_STATE;
// Always called when the town is left.
break;

beginstate START_STATE;
	if ((get_crime_level() > 0) && (get_flag(250,3) == 0)) {
		set_flag(250,3,1);
		message_dialog("You feel a chill come over you. The gods have seen your crimes, and they will certainly punish you. The only questions are when and how.","");
		}
		
	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"Brrr.");
break;

beginstate 10;
if (get_flag(1,0) == 0) {
	set_flag(1,0,1);
	message_dialog("You step outside the room in which you spent the previous night. The lodgings left something to be desired, but then, you were lucky to have found a place to stay at all. Ateria is not a place in which you would want to camp overnight outdoors.","As you shake the sleep off, you realize that your skin feels like a damp fish; it is a bitterly cold morning.");
	}
break;

beginstate 11;
if (get_flag(1,1) == 0) {
	reset_dialog();
	add_dialog_str(0,"The innkeeper stands at the bar, idly sweeping the counter and shivering. She was happy enough to see you last night, assuring you that you would find no better inn anywhere in Ateria. You have little reason to doubt that.",0);
	add_dialog_str(1,"The beds were a far sight better than you had experienced so far. The journey to Ateria was overland through the most desolate parts of the empire. You slept on rocks most nights, and you did your best to ignore the increasing cold.",0);
	add_dialog_str(2,"Ateria itself was completely enveloped in fog last night when you arrived. You have not yet gotten a proper view of the land. Despite the cold, you must move on soon. You should pick up your gear you left in the dresser and move on.",0);
	add_dialog_str(3,"Your goal is a town called Timoria, somewhere farther down the road. The empire's deputy in this region resides there. He should be able to tell you what you are supposed to do.",0);
	set_flag(1,1,run_dialog(1));
	}
break;